GATE Exam  >  GATE Questions  >  Consider the language L = {ann > 0} ∪ ... Start Learning for Free
Consider the language L = {an⏐n > 0} ∪ {anbn⏐n ≥ 0} and the following statements.
I. L is deterministic context-free.
II. L is context-free but not deterministic context-free.
III. L is not LL(k ) for any k.
Which of the above statements is/are TRUE?
  • a)
    l and III only
  • b)
    III only
  • c)
    I only
  • d)
    II only
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
Consider the language L = {ann > 0} ∪ {anbnn ≥ 0} and the fo...
• Statement I: L in DCFL is true, since {an} ∪ {anbn} = regular ∪ DCFL = DCFL, by closure property. So II is false and I is true.
• Statement III is true because we cannot write LL(k ) grammar, for any value of k , since no matter how many a’s are shown to compiler it will be impossible to distinguish between whether the string presented is in the form of {an} or {anbn} and hence the production cannot be chosen uniquely for any value of k.
So option (a) is correct, I and III only are true.
View all questions of this test
Explore Courses for GATE exam
Consider the language L = {ann > 0} ∪ {anbnn ≥ 0} and the following statements.I.L is deterministic context-free.II.L is context-free but not deterministic context-free.III.L is not LL(k ) for any k.Which of the above statements is/are TRUE?a)l and III onlyb)III onlyc)I onlyd)II onlyCorrect answer is option 'A'. Can you explain this answer?
Question Description
Consider the language L = {ann > 0} ∪ {anbnn ≥ 0} and the following statements.I.L is deterministic context-free.II.L is context-free but not deterministic context-free.III.L is not LL(k ) for any k.Which of the above statements is/are TRUE?a)l and III onlyb)III onlyc)I onlyd)II onlyCorrect answer is option 'A'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Consider the language L = {ann > 0} ∪ {anbnn ≥ 0} and the following statements.I.L is deterministic context-free.II.L is context-free but not deterministic context-free.III.L is not LL(k ) for any k.Which of the above statements is/are TRUE?a)l and III onlyb)III onlyc)I onlyd)II onlyCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider the language L = {ann > 0} ∪ {anbnn ≥ 0} and the following statements.I.L is deterministic context-free.II.L is context-free but not deterministic context-free.III.L is not LL(k ) for any k.Which of the above statements is/are TRUE?a)l and III onlyb)III onlyc)I onlyd)II onlyCorrect answer is option 'A'. Can you explain this answer?.
Solutions for Consider the language L = {ann > 0} ∪ {anbnn ≥ 0} and the following statements.I.L is deterministic context-free.II.L is context-free but not deterministic context-free.III.L is not LL(k ) for any k.Which of the above statements is/are TRUE?a)l and III onlyb)III onlyc)I onlyd)II onlyCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of Consider the language L = {ann > 0} ∪ {anbnn ≥ 0} and the following statements.I.L is deterministic context-free.II.L is context-free but not deterministic context-free.III.L is not LL(k ) for any k.Which of the above statements is/are TRUE?a)l and III onlyb)III onlyc)I onlyd)II onlyCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider the language L = {ann > 0} ∪ {anbnn ≥ 0} and the following statements.I.L is deterministic context-free.II.L is context-free but not deterministic context-free.III.L is not LL(k ) for any k.Which of the above statements is/are TRUE?a)l and III onlyb)III onlyc)I onlyd)II onlyCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for Consider the language L = {ann > 0} ∪ {anbnn ≥ 0} and the following statements.I.L is deterministic context-free.II.L is context-free but not deterministic context-free.III.L is not LL(k ) for any k.Which of the above statements is/are TRUE?a)l and III onlyb)III onlyc)I onlyd)II onlyCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of Consider the language L = {ann > 0} ∪ {anbnn ≥ 0} and the following statements.I.L is deterministic context-free.II.L is context-free but not deterministic context-free.III.L is not LL(k ) for any k.Which of the above statements is/are TRUE?a)l and III onlyb)III onlyc)I onlyd)II onlyCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider the language L = {ann > 0} ∪ {anbnn ≥ 0} and the following statements.I.L is deterministic context-free.II.L is context-free but not deterministic context-free.III.L is not LL(k ) for any k.Which of the above statements is/are TRUE?a)l and III onlyb)III onlyc)I onlyd)II onlyCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev